[NTG-context] Re: Buffer and \input content as input for \processtokens, etc.

2023-12-06 Thread Hans Hagen
oopovermatch % {(.-)(\letterpercent b\letterleftbrace\letterrightbrace)(.-)} % {Th{i}s {is} not a {que{s}tion} anymore!} % {#1<#2>#3} \startluacode interfaces.implement { name = "WeirdCommand", -- arguments = "string", arguments = "detokened",

[NTG-context] Combining python and lua

2023-10-25 Thread Alexandre Christe
} context.bTABLE()  context.bTR()  context.bTD() context("$x$") context.eTD()  context.bTD() context("$0$") context.eTD()  for _, a in ipairs(angleList) do  context.bTD() context("$\letterpercent.0f$",a) context.eTD()  end  context.eTR()  context.bTR()  context.bTD() con

[NTG-context] Re: Attempting to Generate PDF/A in LMTX

2023-10-04 Thread Henning Hraban Ramm
v2 300% (ECI)' Here is a MWE that generates these errors: setupinteraction   [title=TITLE,    subtitle=SUBTITLE,    author=AUTHOR,    keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}] %% For PDF/A \setupbackend[ format={pdf/a-1b:2005}, % or pdf/a-1a:2005 profile={default_cmyk.icc,default_rgb.icc,de

[NTG-context] Attempting to Generate PDF/A in LMTX

2023-10-03 Thread Jin-Ho King
subtitle=SUBTITLE, author=AUTHOR, keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}] %% For PDF/A \setupbackend[ format={pdf/a-1b:2005}, % or pdf/a-1a:2005 profile={default_cmyk.icc,default_rgb.icc,default_gray.icc}, intent=ISO coated v2 300\letterpercent\space (ECI)] %% Tagged PDF %% method=auto =

Re: [NTG-context] never add a hyphen to break a URL

2022-10-24 Thread Pablo Rodriguez via ntg-context
nclose the url inside \startasciimode...\stopasciimode to avoid escaping the percent sign. The percent sign has to be escaped as \letterpercent (otherwise, you get \%) in text. A simpler approach would read (there is a single url, instead of two [less typos in the end]): \setupinteraction[state=start] \sta

Re: [NTG-context] Adobe Acrobat accessibility criteria

2021-07-28 Thread Hans Hagen via ntg-context
on PDF/A <https://wiki.contextgarden.net/PDF/A>: --- \setupinteraction[title=MyTitle,state=start] \setupinteractionscreen[option={title}] \setupbackend[ format={pdf/a-1a:2005}, profile={default_cmyk.icc,default_rgb.icc,default_gray.icc}, intent=ISO coated v2 300\letterpercent\spac

Re: [NTG-context] Adobe Acrobat accessibility criteria

2021-07-27 Thread Connor P. Jackson via ntg-context
PDF/A>: --- \setupinteraction[title=MyTitle,state=start] \setupinteractionscreen[option={title}] \setupbackend[ format={pdf/a-1a:2005}, profile={default_cmyk.icc,default_rgb.icc,default_gray.icc}, intent=ISO coated v2 300\letterpercent\space (ECI)] %% Tagged PDF %% method=auto ==> def

Re: [NTG-context] ctxlua percentage format escape

2021-05-29 Thread Adam Reviczky
Thank you Jairo! I have tried playing around with letterpercent/catcodes as well, not sure what I did wrong, but your examples work just fine, so thanks again. Adam On Sat, May 29, 2021 at 2:04 PM Jairo A. del Rio wrote: > Hi, Adam. There are some ways to do it. I'm sure there are many m

Re: [NTG-context] ctxlua percentage format escape

2021-05-29 Thread Jairo A. del Rio
... \relax doesn't work \startmkivmode \startluacode xmath = xmath or math xcomplex = xcomplex or {} --maybe math too??? \stopluacode \stopmkivmode \starttext $\pi = \ctxlua{context("\letterpercent.6f", math.pi)}$ $\pi = \expression string.format("\letterpercent.6f", pi

Re: [NTG-context] Issue with \handletokens\with and Lua-defined macros

2021-03-29 Thread Hans Hagen
7839 84828001486412574060553756854137069878601 ]] end \stopluacode \starttext \doloopovermatch {\letterpercent d} {\luaexpr{userdata.myfunction()}} {% \colored[h=\luaexpr{40*#1},s=1,v=1]{#1}\space } (I think it

Re: [NTG-context] Escaping reserved/problematic characters

2021-03-11 Thread Wolfgang Schuster
a ConTeXt perspective in the following list (sorry about the formatting!):     '{': "\\{" \letterleftbrace     '}': "\\}" \letterrightbrace     '_': "\\_" No escape needed.     '%': "\\%" \letterpercent     '#': "\\#&quo

Re: [NTG-context] lmtx error: You can't use 'integer 340' in internal vertical mode

2021-02-19 Thread juh
uckerei %% nachfragen. \setupbackend[ %format=PDF/X-1a:2001, %format=PDF/X-1a:2003, %format=PDF/X-3:2002, format=PDF/X-3:2003, %format=PDF/X-4, %format=PDF/X-4p, intent={ISO Coated v2 300\letterpercent\space (ECI)}, ] \stopmode %% FOGRA 39 Coated %% Bestimmung der CMYK-We

[NTG-context] lmtx error: You can't use 'integer 340' in internal vertical mode

2021-02-19 Thread juh
DF/X-3:2003, intent={ISO Coated v2 300\letterpercent\space (ECI)}, ] Ciao! Jan Ulrich Hasecke -- -- Autoren-Homepage: . http://literatur.hasecke.com Satiren & Essays: . http://www.sudelbuch.de Privater Blog: http://www.hasecke.eu Netzliteratur-Projekt:

Re: [NTG-context] Loop?

2021-02-13 Thread Hans Hagen
entry. Very nice and easy to maintain the list of names. You have to wikify all the answers ... here's another one: \doloopovermatch {([^\letterpercent s,]+)} {aa, bb, cc, dd} {/#1/} or more complex matching: \doloopovermatch {(\letterpercent w+) *(\letterpercent w*)} {aa bb cc dd

[NTG-context] 3 questions about xtables after reading manuals

2021-01-18 Thread Andres Conrado Montoya
ght] Valor nominal \stopxcell \startxcell \$100\,000 \stopxcell \stopxrow \startxrow \startxcell[align=right] Tasa cupón - periodicidad anual \stopxcell \startxcell 12,50\,\letterpercent{} \stopxcell \stopxrow \startxrow \startxcell[align=right] Cupón \stopxcell \startxcell \$12\,500 \stopxcell \stopxrow

Re: [NTG-context] How can I make the notes under this table inherit the width of the table, and not the \textwidth?

2020-11-10 Thread Sylvain Hubert
nt=7pt] > \startxtablehead[head] > \startxrow > \startxcell[align=right,width=.1\textwidth] \strong{Altura\crlf (msnm)} > \stopxcell > \startxcell[align=right,width=.28\textwidth] \strong{Gramíneas forrajeras > de corte} \stopxcell > \startxcell[align=middle,width=.06\text

[NTG-context] How can I make the notes under this table inherit the width of the table, and not the \textwidth?

2020-11-10 Thread Andres Conrado Montoya
] \strong{MS (\letterpercent{})} \stopxcell \startxcell[align=middle,width=.1\textwidth] \strong{PC\crlf (\letterpercent{} MS)} \stopxcell \startxcell[align=middle,width=.1\textwidth] \strong{FDN\crlf (\letterpercent{} MS)} \stopxcell \startxcell[align=middle,width=.1\textwidth] \strong{FDA\crlf

Re: [NTG-context] need help comparing strings

2020-10-13 Thread Pablo Rodriguez
On 10/13/20 5:33 PM, Pablo Rodriguez wrote: > [...] > \starttext > \ctxlua{ d = [[\env{fname}]] } > > d: \cldcontext{d}\\ > \doifelse{\cldcontext{d:match("\letterpercent d+")}} > {123}{yes}{no} > \stoptext > [...] > 3. I’m trying this on

Re: [NTG-context] need help comparing strings

2020-10-13 Thread Wolfgang Schuster
Pablo Rodriguez schrieb am 13.10.2020 um 17:33: Dear list, I have the following sample: \starttext \def\numbersfname {\cldcontext{string.match([[\env{fname}]], "\letterpercent d+")}} \ctxlua{ c = context.getvariable("environment", "fname") or &quo

Re: [NTG-context] need help comparing strings

2020-10-13 Thread Aditya Mahajan
On Tue, 13 Oct 2020, Pablo Rodriguez wrote: > Dear list, > > I have the following sample: > > \starttext > \def\numbersfname > {\cldcontext{string.match([[\env{fname}]], "\letterpercent d+")}} > \ctxlua{ c = context.getvariable("environment"

[NTG-context] need help comparing strings

2020-10-13 Thread Pablo Rodriguez
Dear list, I have the following sample: \starttext \def\numbersfname {\cldcontext{string.match([[\env{fname}]], "\letterpercent d+")}} \ctxlua{ c = context.getvariable("environment", "fname") or "a" } \ctxlua{ d = [[\env{fname}]] } tex:

[NTG-context] Lua equivalent of \getvariable{}{}

2020-10-11 Thread Pablo Rodriguez
} c: \cldcontext{c}\\ \doifelse{\cldcontext{c:match("\letterpercent d+")}} {123}{yes}{no}\\ d: \cldcontext{d}\\ \doifelse{\cldcontext{d:match("\letterpercent d+")}} {123}{yes}{no} \stoptext Which is the Lua equivalent of \getvariable{}{}?

Re: [NTG-context] catch % in gsub("%", "\\letterpercent")

2020-08-27 Thread Pablo Rodriguez
On 8/27/20 7:35 PM, Wolfgang Schuster wrote: > [...] > You have to replace %% with \letterpercent\letterpercent because you're > still playing with TeX rules. > > \startxmlsetups xml:special >     \startitem > \cldcontext{string.gsub("\xmlraw{#1}{.}"

Re: [NTG-context] catch % in gsub("%", "\\letterpercent")

2020-08-27 Thread Wolfgang Schuster
Pablo Rodriguez schrieb am 27.08.2020 um 19:16: On 8/27/20 6:16 PM, Wolfgang Schuster wrote: Pablo Rodriguez schrieb am 27.08.2020 um 17:56: [...] \startxmlsetups xml:special \startitem \cldcontext{string.gsub([[\xmlraw{#1}{.}]], "%%", "

Re: [NTG-context] catch % in gsub("%", "\\letterpercent")

2020-08-27 Thread Pablo Rodriguez
On 8/27/20 6:16 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 27.08.2020 um 17:56: >> [...] >>\startxmlsetups xml:special >> \startitem >> \cldcontext{string.gsub([[\xmlraw{#1}{.}]], "%%", >> "\\letterp

Re: [NTG-context] catch % in gsub("%", "\\letterpercent")

2020-08-27 Thread Wolfgang Schuster
Pablo Rodriguez schrieb am 27.08.2020 um 17:56: On 8/27/20 5:30 PM, Taco Hoekwater wrote: [...] Using Lua gsub(), I need to replace something like:  string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent") Double it: %% See also https://www.lua.org/manual/5

Re: [NTG-context] catch % in gsub("%", "\\letterpercent")

2020-08-27 Thread Pablo Rodriguez
On 8/27/20 5:30 PM, Taco Hoekwater wrote: >> [...] >> Using Lua gsub(), I need to replace something like: >> >>  string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent") > > Double it: %% > > See also https://www.lua.org/manual/5.3/manual.htm

Re: [NTG-context] catch % in gsub("%", "\\letterpercent")

2020-08-27 Thread Hans van der Meer
xt with percent signs. > ConTeXt parses them as comments (so no output). > > Using Lua gsub(), I need to replace something like: > > string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent") > > How do I need to invoke % to get the character found? > > Ma

Re: [NTG-context] catch % in gsub("%", "\\letterpercent")

2020-08-27 Thread Taco Hoekwater
> string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent") Double it: %% See also https://www.lua.org/manual/5.3/manual.html#6.4.1 , but the mention of %% is a bit hidden. Best wishes, Taco___ If your que

[NTG-context] catch % in gsub("%", "\\letterpercent")

2020-08-27 Thread Pablo Rodriguez
Dear list, I have and \xmlraw command that gives some text with percent signs. ConTeXt parses them as comments (so no output). Using Lua gsub(), I need to replace something like: string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent") How do I need to invoke % to get

[NTG-context] new upload - matching gimmick

2020-08-11 Thread Hans Hagen
Hi, For those who like playing around you can use lua pettern matching in a match loop: \starttext \doloopovermatch {(\letterpercent w+) *(\letterpercent w*)} {aa bb cc dd} { [ \doloopovermatch {(\letterpercent w)(\letterpercent w)} {#1

Re: [NTG-context] Checking existence of a macro (control sequence) by Lua - problem after updating MkIV

2020-06-19 Thread Lukas/ConTeXt
Hello Hans, -- Původní e-mail -- { Od: Hans Hagen as you updated, it's just: \startluacode local defined = tokens.defined for _, v in ipairs{ "MyMacro", "MyMacWithPars", "Undefined", "DoNothing", "NonExisting" }

Re: [NTG-context] Checking existence of a macro (control sequence) by Lua - problem after updating MkIV

2020-06-18 Thread Hans Hagen
== "undefined_cmd" end end end -- local defined = tokens.defined for _, v in ipairs{ "MyMacro", "MyMacWithPars", "Undefined", "DoNothing", "NonExisting" } do print(string.format("\letter

Re: [NTG-context] Checking existence of a macro (control sequence) by Lua - problem after updating MkIV

2020-06-18 Thread Lukas/ConTeXt
ot;DoNothing", "NonExisting" } do  print(string.format("\letterpercent-12s", v), defined(v), defined(v, true), defined(v, false))    end  \stopluacode  Aaa \stoptext gives: " MyMacro false   false   false MyMacWithPars   false   false   false Undefined   f

Re: [NTG-context] Checking existence of a macro (control sequence) by Lua - problem after updating MkIV

2020-06-18 Thread Hans van der Meer
ot;undefined_cmd" >end >end >end > >-- > >local defined = tokens.defined > >for _, v in ipairs{ "MyMacro", "MyMacWithPars", "Undefined", "DoNothing", > "NonExisting"

[NTG-context] Checking existence of a macro (control sequence) by Lua - problem after updating MkIV

2020-06-18 Thread Lukas/ConTeXt
nd end -- local defined = tokens.defined for _, v in ipairs{ "MyMacro", "MyMacWithPars", "Undefined", "DoNothing", "NonExisting" } do print(string.format("\letterpercent-12s", v), defined(v), defined(v, true), defined(v,

Re: [NTG-context] \setupbackend in MkIV

2020-05-25 Thread Hans Hagen
{xmpfile}}\ifempty   \p_file \else \clf_setxmpf... \setup_backend ...end [#1]\the \everysetupbackend l.11 ...ISO coated v2 300\letterpercent\space (ECI)] mtx-context | fatal error: return code: 1 Removing either of the \setupbackend

Re: [NTG-context] \setupbackend in MkIV

2020-05-25 Thread Wolfgang Schuster
{xmpfile}}\ifempty   \p_file \else \clf_setxmpf... \setup_backend ...end [#1]\the \everysetupbackend l.11 ...ISO coated v2 300\letterpercent\space (ECI)] mtx-context | fatal error: return code: 1 Removing either of the \setupbackend

[NTG-context] \setupbackend in MkIV

2020-05-25 Thread Rik Kabel
  \p_file \else \clf_setxmpf... \setup_backend ...end [#1]\the \everysetupbackend l.11 ...ISO coated v2 300\letterpercent\space (ECI)] mtx-context | fatal error: return code: 1 Removing either of the \setupbackend instructions still results in the same error

Re: [NTG-context] Trouble setting PDF boxes

2020-04-30 Thread Jack Steyn
[location=middle, marking=on] \setupinteraction [title={TestDoc}, author={Anon}] \setupbackend [format=PDF/X-1a:2003, intent={ISO Coated v2 300\letterpercent\space (ECI)}] \setupinteractionscreen[width=max,height=max] \startluacode moduledata.mystuff={} respecify_pdf_boxes = function

Re: [NTG-context] Trouble setting PDF boxes

2020-04-25 Thread Jack Steyn
/base/mkiv/lpdf-mis.lua: \appendtoks \startluacode local formatters = string.formatters local pdfverbose = lpdf.verbose local pdfarray = lpdf.array local factor = number.dimenfactors.bp local f_value = formatters["\letterpercent.6N"] local functio

Re: [NTG-context] attachments working again (issue with /EmbeddedFiles)

2020-02-12 Thread Rik Kabel
[state=start] \setupinteraction[state=start] %setupbackend[format={pdf/a-3u}, \setupbackend[format={pdf/a-3a}, level=0, profile={default_gray.icc}, intent={ISO coated v2 300\lett

Re: [NTG-context] Color Profiles in lmtx

2020-02-12 Thread Peter Rolf
Am 12.02.2020 um 09:41 schrieb juh: > Hi all, > > again I have a question concerning color profiles. > > I have this to load the ISO Coated v2 300% profile. > > \setupbackend[ >format=PDF/X-3:2003, > intent={ISO Coated v2 300\letterpercent\space (ECI)}, >]

[NTG-context] Color Profiles in lmtx

2020-02-12 Thread juh
Hi all, again I have a question concerning color profiles. I have this to load the ISO Coated v2 300% profile. \setupbackend[ format=PDF/X-3:2003, intent={ISO Coated v2 300\letterpercent\space (ECI)}, ] \setupcolors[cmyk=yes,rgb=no,] But is this profile part of the new lmtx version

Re: [NTG-context] Disappearing font feature

2019-12-22 Thread Hans Hagen
-blackitalic] \startbuffer [Sampler] A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z à ë í ô ç 1 2 3 4 5 6 7 8 9 0 ` \texttilde\ - = ! @ \# \$ \letterpercent\ ^ \& * ( ) _ + [ ] \textbacks

[NTG-context] Disappearing font feature

2019-12-21 Thread Rik Kabel
J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z à ë í ô ç 1 2 3 4 5 6 7 8 9 0 ` \texttilde\ - = ! @ \# \$ \letterpercent\ ^ \& * ( ) _ + [ ] \textbackslash\ ; ' , . / \{ \} \| : " < > ? \fontname\font \blank

Re: [NTG-context] PDF/A-3a attachment support query

2019-12-06 Thread Peter Rolf
achment. > > \setuplanguage   [en] > \setuptagging    [state=start] > \setupinteraction    [state=start] > \setupbackend    [format={pdf/a-3a},profile={default_gray.icc}, >   intent={ISO coated v2 300\letterpercent\space > (ECI)}] >

[NTG-context] PDF/A-3a attachment support query

2019-12-05 Thread Rik Kabel
},   intent={ISO coated v2 300\letterpercent\space (ECI)}] \setupstructure  [state=start,method=auto] \setupcolors [pagecolormodel=auto,start=yes,rgb=no,cmyk=no] \setupbodyfont   [Palatino,10pt] \starttext   Attaching a plain text file. % \attachment

Re: [NTG-context] ASCII mode within \footnote

2019-11-08 Thread context
, if you have many such files is to define a macro: \define[1]\APPDATA{\mono{\letterpercent APPDATA\letterpercent\letterbackslash#1}} And then use: \footnote{\APPDATA{file.txt}} or ... \footnote{\type[compact=absolute]{%APPDATA%\file.txt

Re: [NTG-context] ASCII mode within \footnote

2019-11-08 Thread Hans Hagen
with the \typeinlinebuffer command. \starttext \startbuffer %APPDATA%\file.txt \stopbuffer \footnote{\typeinlinebuffer} \stoptext Another option, if you have many such files is to define a macro: \define[1]\APPDATA{\mono{\letterpercent APPDATA\letterpercent\letterbackslash#1}} And then use: \footnote

Re: [NTG-context] ASCII mode within \footnote

2019-11-07 Thread Aditya Mahajan
%APPDATA%\file.txt \stopbuffer \footnote{\typeinlinebuffer} \stoptext Another option, if you have many such files is to define a macro: \define[1]\APPDATA{\mono{\letterpercent APPDATA\letterpercent\letterbackslash#1}} And then use: \footnote{\APPDATA{file.txt}} Aditya

Re: [NTG-context] ASCII mode within \footnote

2019-11-04 Thread Aditya Mahajan
On Mon, 4 Nov 2019, cont...@vivaldi.net wrote: Hello Aditia, thanks for reaction. I simply want to write "%APPDATA%\file.txt" and the same into the footnote, with ability to use the text "%APPDATA%\file.txt" without any substitution (like "%" -> &quo

Re: [NTG-context] ASCII mode within \footnote

2019-11-04 Thread context
Hello Aditia, thanks for reaction. I simply want to write "%APPDATA%\file.txt" and the same into the footnote, with ability to use the text "%APPDATA%\file.txt" without any substitution (like "%" -> "\letterpercent") - if possible. My attepmts with

Re: [NTG-context] ASCII mode within \footnote

2019-11-02 Thread Aditya Mahajan
not simply print "%": "%" at the end yields "" whilst "\%" produces "\%". Is there a simple way to prinst simple "%"? (There is probably a more clumsy way - type \letterpercent instead of % - but this is a minimal sample; in my re

Re: [NTG-context] ASCII mode within \footnote

2019-11-02 Thread context
t; at the end yields "" whilst "\%" produces "\%". Is there a simple way to prinst simple "%"? (There is probably a more clumsy way - type \letterpercent instead of % - but this is a minimal sample; in my real sample there are many "%"s to be shown a

Re: [NTG-context] Manipulating the pagenumber in the TOC

2019-04-21 Thread Wolfgang Schuster
Willi Egger schrieb am 21.04.2019 um 19:28: Hi all, "when manipulating in one area you will have to manipulate also in other aeras” I must confess. I asked some time ago about manipulating the pagenumber. Wolfgang provide me the following approach: \cldcontext{“\letterperce

[NTG-context] Manipulating the pagenumber in the TOC

2019-04-21 Thread Willi Egger
Hi all, "when manipulating in one area you will have to manipulate also in other aeras” I must confess. I asked some time ago about manipulating the pagenumber. Wolfgang provide me the following approach: \cldcontext{“\letterpercent.0f”,(\pagenumber+1)/2} This works indeed fine. Howeve

Re: [NTG-context] Troubles with the \cldcontext command

2019-04-02 Thread Willi Egger
pulate the page number. However I > get an error: > > > MWE: > > \setuppapersize [A6] [A6] > > \setuppagenumbering[location=none] > > \startsetups [Pagenumber] > \doifrightpageelse >{\cldcontext{"\letterpercent d",(\pagenumber+1)/2}} >

Re: [NTG-context] Troubles with the \cldcontext command

2019-04-02 Thread Wolfgang Schuster
Willi Egger schrieb am 02.04.19 um 21:17: Hello! I have the following code, which should manipulate the page number. However I get an error: MWE: \setuppapersize [A6] [A6] \setuppagenumbering[location=none] \startsetups [Pagenumber] \doifrightpageelse {\cldcontext{"\letterpe

[NTG-context] Troubles with the \cldcontext command

2019-04-02 Thread Willi Egger
Hello! I have the following code, which should manipulate the page number. However I get an error: MWE: \setuppapersize [A6] [A6] \setuppagenumbering[location=none] \startsetups [Pagenumber] \doifrightpageelse {\cldcontext{"\letterpercent d",(\pagenumber+1)/2}} {} \

Re: [NTG-context] A strange request...

2019-02-20 Thread Wolfgang Schuster
[pagenumber] \doifoddpageelse {\cldcontext{"\letterpercent d",(\pagenumber+1)/2}} {} \stopsetups \setupheadertexts [\directsetup{pagenumber}] \starttext \dorecurse{10}{\samplefile{knuth}} \stoptext Variant 2: \defineexpandable[1]\DwarsliggerNumber {\cldcontext{"\

Re: [NTG-context] Define color with calculations

2019-02-18 Thread Henri Menke
lor[mycolor][r=0.5*0.7] > > \starttext > > \colored[r=\cldcontext{0.5*0.7}]{\cldcontext{0.5*0.7}} > > \colored[r=\cldcontext{"\letterpercent > .3f",0.5*0.7}]{\cldcontext{"\letterpercent .3f",0.5*0.7}} > > \stoptext > Better use \luaexpr. From th

Re: [NTG-context] Define color with calculations

2019-02-18 Thread Wolfgang Schuster
[r=\cldcontext{"\letterpercent .3f",0.5*0.7}]{\cldcontext{"\letterpercent .3f",0.5*0.7}} \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the W

Re: [NTG-context] Color profile not found

2019-02-03 Thread Jan U. Hasecke
> > I copied the file CoatedFOGRA39.icc to > > context/tex/texmf-context/colors/icc/profiles > > My setup worked before. > > Using the intent "ISO Coated v2 300\letterpercent\space (ECI)" I get no > error. > I solved the problem by installing the color

[NTG-context] Color profile not found

2019-02-03 Thread Jan U. Hasecke
ng the intent "ISO Coated v2 300\letterpercent\space (ECI)" I get no error. TIA juh ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http:/

[NTG-context] PDF/A and \chemical

2019-01-03 Thread Axel Kielhorn
[ format={pdf/a-1b:2005}, % or pdf/a-1a:2005 profile={default_cmyk.icc,default_rgb.icc,default_gray.icc}, intent=ISO coated v2 300\letterpercent\space (ECI)] %% Tagged PDF %% method=auto ==> default tags by Adobe \setupbackend[export=yes] \setupstructure[state=start,method=auto] \starttext \chap

Re: [NTG-context] directlua question

2018-12-04 Thread Wolfgang Schuster
finished string near eof”. Obviously caused by the %’s. How to get this working? \textpercent will not do, off course within Luacode. % = \letterpercent $ = \letterdollar You can also replace \directlua{tex.print(...)} with \ctxlua{context(...)} or \cldcontext

Re: [NTG-context] can \REGISTER[key]{term} modify typesetting (adding space)?

2018-11-27 Thread Wolfgang Schuster
]{term}\letterpercent \xmlflush{#1} Have you tried this? (I cannot construct an MWE at this point either.) And now I can construct it, so here is a not-necessarily-minimal example. Note that the problem occurs in footnotes (and endnotes, left as an exercise to the curious

Re: [NTG-context] can \REGISTER[key]{term} modify typesetting (adding space)?

2018-11-27 Thread Rik Kabel
, as \Name[key]{term}% \xmlflush{#1} or perhaps \Name[key]{term}\letterpercent \xmlflush{#1} Have you tried this? (I cannot construct an MWE at this point either.) And now I can construct it, so here is a not-necessarily-minimal example. Note that the problem occurs in footnotes

Re: [NTG-context] can \REGISTER[key]{term} modify typesetting (adding space)?

2018-11-27 Thread Rik Kabel
} or perhaps \Name[key]{term}\letterpercent \xmlflush{#1} Have you tried this? (I cannot construct an MWE at this point either.) -- Rik ___ If your question is of interest to others as well, please add an entry

Re: [NTG-context] PDF/A output fails validation

2018-11-22 Thread Rik Kabel
eyword={{KEYWORD1, KEYWORD2}, KEYWORD3}] %% For PDF/A \setupbackend[ %format={pdf/a-1b:2005}, % OK %format={pdf/a-1a:2005}, % OK %format={pdf/a-2a},      % OK format={pdf/a-3a},       % OK profile={srgb.icc,default_gray.icc}, intent=ISO coated v2 300\letterpercent\space (ECI)] %% Tagged PDF %% m

Re: [NTG-context] PDF/A output fails validation

2018-11-22 Thread luigi scarso
idate.aspx >> >> >> > Thank you for the report, I will check asap. > > these look ok now \nopdfcompression \setupinteraction [title=TITLE, subtitle=SUBTITLE, author=AUTHOR, keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}] %% For PDF/A \setupbackend[ %format={pdf/a-1b:200

Re: [NTG-context] Issues with RGB to CMYK conversion with color profiles

2018-11-12 Thread Hans Hagen
] \setupcolors[cmyk=no,rgb=yes] \stopnotmode \startmode[print] \setupcolors[cmyk=yes,rgb=no] \setupbackend[ format=PDF/X-1a:2003, % intent={ISO Coated v2 300\letterpercent\space (ECI)}, intent={SWOP2006_Coated3v2.icc}, ] \stopmode \setuppapersize [A4] [A4] \starttext

[NTG-context] Issues with RGB to CMYK conversion with color profiles (was: Colormanagement)

2018-11-12 Thread Jan U. Hasecke
=PDF/X-1a:2003, % intent={ISO Coated v2 300\letterpercent\space (ECI)}, intent={SWOP2006_Coated3v2.icc}, ] \stopmode \setuppapersize [A4] [A4] \starttext \blackrule[width=3cm,height=1cm,depth=0pt,color=hs-orange] HS Orange r=0.866, g=0.286, b=0.003 \blank \blackrule[width=3cm,height=1cm

Re: [NTG-context] Colormanagement

2018-11-09 Thread luigi scarso
t; \stopnotmode > > \startmode[print] > \setupcolors[cmyk=yes,rgb=no] > \setupbackend[ > format=PDF/X-3:2003, >intent={ISO Coated v2 300\letterpercent\space (ECI)}, >] > \stopmode > > When I use "context" or "context --mode=pri

[NTG-context] Colormanagement

2018-11-09 Thread Jan U. Hasecke
:2003, intent={ISO Coated v2 300\letterpercent\space (ECI)}, ] \stopmode When I use "context" or "context --mode=print" everything works as expected. But! I have SVG icons I want to use in the document. They contain the above defined rgb colors. When I use --mode=print I

Re: [NTG-context] profile specification '{ISO Coated v2 300% (ECI)} ' not found in 'colorprofiles.xml, colorprofiles.lua'

2018-10-03 Thread Jan U. Hasecke
On 03.10.18 11:29, Wolfgang Schuster wrote: > > > Jan U. Hasecke schrieb am 01.10.18 um 10:47: >> I get this error when I try to compile a pdf with: >> >> \setupbackend[ >>    format=PDF/X-3:2003, >>    intent={ISO Coated v2 300\letterpercent\space (EC

Re: [NTG-context] profile specification '{ISO Coated v2 300% (ECI)} ' not found in 'colorprofiles.xml, colorprofiles.lua'

2018-10-03 Thread Wolfgang Schuster
Jan U. Hasecke schrieb am 01.10.18 um 10:47: I get this error when I try to compile a pdf with: \setupbackend[ format=PDF/X-3:2003, intent={ISO Coated v2 300\letterpercent\space (ECI)} ] You need a comma after the right brace for the intent argument. When you take a closer look

[NTG-context] profile specification '{ISO Coated v2 300% (ECI)} ' not found in 'colorprofiles.xml, colorprofiles.lua'

2018-10-01 Thread Jan U. Hasecke
I get this error when I try to compile a pdf with: \setupbackend[ format=PDF/X-3:2003, intent={ISO Coated v2 300\letterpercent\space (ECI)} ] In log: backend > profiles > setting format to 'PDF/X-3:2003' backend > profiles > forcing pdf version 1.4.0, compres

Re: [NTG-context] date calculated with currentdate plus n days

2018-08-13 Thread Henri Menke
/18 05:37, Jan U. Hasecke wrote: On 13.08.2018 17:57, Pablo Rodriguez wrote: if you don’t mind using Lua, here you have it: \starttext \def\duedate{\cldcontext{os.date('\letterpercent d/\letterpercent m/\letterpercent Y', os.time()+ 10 * 24 * 3600)}} \duedate

Re: [NTG-context] date calculated with currentdate plus n days

2018-08-13 Thread Jan U. Hasecke
On 13.08.2018 17:57, Pablo Rodriguez wrote: > if you don’t mind using Lua, here you have it: > > \starttext > \def\duedate{\cldcontext{os.date('\letterpercent d/\letterpercent > m/\letterpercent Y', os.time()+ 10 * 24 * 3600)}} > > \duedate > \st

Re: [NTG-context] date calculated with currentdate plus n days

2018-08-13 Thread Pablo Rodriguez
if you don’t mind using Lua, here you have it: \starttext \def\duedate{\cldcontext{os.date('\letterpercent d/\letterpercent m/\letterpercent Y', os.time()+ 10 * 24 * 3600)}} \duedate \stoptext Just in case it helps, Pablo

Re: [NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Hans Hagen
On 1/14/2018 9:50 PM, Fabrice Couvreur wrote: Hi Hans, Your code runs perfectly, thanks. However, if I replace % with \letterpercent, my code does not run \ctxlua{print(string.format("\letterpercent g",Binomial(100,60,0.25)))} because print prints to the console Thank you Fab

Re: [NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Fabrice Couvreur
Hi Hans, Your code runs perfectly, thanks. However, if I replace % with \letterpercent, my code does not run \ctxlua{print(string.format("\letterpercent g",Binomial(100,60,0.25)))} Thank you Fabrice 2018-01-14 13:58 GMT+01:00 Hans Hagen <pra...@wxs.nl>: > On 1/14/2018 1:1

Re: [NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Hans Hagen
g",Binomial(100,60,0.25)))} \stoptext the % should be \letterpercent btw, use locals for numer and denom you can also do this: \startluacode function document.Binomial(n,k,p) if k > n then return nil end if k > n/2 then k = n - k

Re: [NTG-context] issue with css selector in lpath

2017-12-14 Thread Hans Hagen
o you need to escape it: \xmlsetsetup{#1}{{\letterhash header}}{xml:header:id} The same is true for % : \letterpercent. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061

Re: [NTG-context] (My) problem with percent sign in URLs -- about Wiki

2017-08-15 Thread Alan Braslau
Are there some other predefined "\letterxxx" commands? > \letteropenbrace > \letterclosebrace > \letterampersand > \letterless > \lettermore > \letterhash > \letterdoublequote > \lettersinglequote > \letterdollar > \letterpercent > \letterhat > \

Re: [NTG-context] (My) problem with percent sign in URLs -- about Wiki

2017-08-15 Thread Wolfgang Schuster
lequote \lettersinglequote \letterdollar \letterpercent \letterhat \letterunderscore \letterbar \lettertilde \letterbackslash \letterslash \letterquestionmark \letterat \lettercolon \letterescape \letterbgroup \letteregroup \letterleftbrace \letterrightbrace \letterexclamationmark Is (and how) p

Re: [NTG-context] (My) problem with percent sign in URLs

2017-08-15 Thread Tomas Hala
1. \hyphenatedurl{http://bits.blogs.nytimes.com/2010/03/05/a-former-book-designer-says-good-riddance-to-print/?hpw\%20hpw} # # Hi Tomas, # # I think \letterpercent is what you need. # # Inside a little more complex sample: # # \setupinteraction[state=start] # \unexpanded\def\mypersonalurl#1{% #

Re: [NTG-context] (My) problem with percent sign in URLs

2017-08-14 Thread Pablo Rodriguez
gt; 1. > \hyphenatedurl{http://bits.blogs.nytimes.com/2010/03/05/a-former-book-designer-says-good-riddance-to-print/?hpw\%20hpw} Hi Tomas, I think \letterpercent is what you need. Inside a little more complex sample: \setupinteraction[state=start] \unexpanded\def\mypersonalurl#1{%

Re: [NTG-context] \startcomment...\stopcomment with XML processing

2017-06-25 Thread Hans Hagen
} {pre[contains(@class,'copy\letterpercent-code')]/code} {xml:copy:code} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:copy:code %~ \startcomment[location

[NTG-context] \startcomment...\stopcomment with XML processing

2017-06-24 Thread Pablo Rodriguez
Dear list, I have the following sample: \startbuffer[demo] 1 2 3 4 5 \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{doc}{xml:doc} \xmlsetsetup{\xmldocument} {pre[contains(@class,'copy\letterpercent-code')]/code

Re: [NTG-context] BUG: % is comment in btx fields

2017-05-08 Thread Henri Menke
On Mon, 2017-05-08 at 16:27 -0600, Alan Braslau wrote: > Of course, you have to escape the percent character if you do not > want > it to be interpreted as a comment... however, in the example below, > the > URL does not get rendered properly, nor does using \letterpercent, so >

Re: [NTG-context] BUG: % is comment in btx fields

2017-05-08 Thread Alan Braslau
Of course, you have to escape the percent character if you do not want it to be interpreted as a comment... however, in the example below, the URL does not get rendered properly, nor does using \letterpercent, so there is something that we need to fix in our treatment of URLs. \startbuffer

Re: [NTG-context] Real number with Lua

2017-04-19 Thread Aditya Mahajan
On Wed, 19 Apr 2017, Procházka Lukáš Ing. wrote: Hello, do you mean this? - It shows EXACTLY 3 digits after the decimal point: \cldcontext{string.format("\letterpercent.3f", 5.8/1.6)} \cldcontext{string.format(string.char(37) .. ".3f", 5.8/1.6)} \startluacode c

Re: [NTG-context] Real number with Lua

2017-04-19 Thread Procházka Lukáš Ing .
Hello, do you mean this? - It shows EXACTLY 3 digits after the decimal point: \cldcontext{string.format("\letterpercent.3f", 5.8/1.6)} \cldcontext{string.format(string.char(37) .. ".3f", 5.8/1.6)} \startluacode context(string.format("%.3f", 5.8/1.6)) \

Re: [NTG-context] Lua code and percent sign

2017-02-27 Thread Hans Hagen
ment again The error is: [\directlua]:1: invalid escape sequence near '\%' 1 \starttext 2 3 >> \ctxlua{context(string.format("\%.2f", math.pi))} 4 5 \stoptext I ended using \letterpercent command but it is not very convenient. Any help is welc

[NTG-context] Lua code and percent sign

2017-02-27 Thread Antoine Cailliau
mat("\%.2f", math.pi))} > 4 > 5 \stoptext I ended using \letterpercent command but it is not very convenient. Any help is welcome, Antoine C. Full log: mtx-context | warning: synctex is enabled > mtx-context | run 1: luatex > --fmt=&q

Re: [NTG-context] call of string.match() inside \ctxlua{}

2017-01-19 Thread Hans Hagen
=thirddata.scancsv.ParseCSVLine('#1','n.º');% local Nlic=(parsedate[2]);% Nlic=tonumber(string.match(Nlic, '%d+'));% %d -> \letterpercent d context(Nlic ~=0 and 1 or 0)}} \starttext \licann{"lesson nº456Alterada"} \stoptext thanks in advance \startluacode

Re: [NTG-context] issue with lpath containing a hyphen

2016-11-21 Thread Hans Hagen
On 11/20/2016 8:47 PM, Pablo Rodriguez wrote: On 11/20/2016 12:13 PM, Hans Hagen wrote: On 11/18/2016 11:32 PM, Pablo Rodriguez wrote: [...] The only way to get the Knuth in the quote is to remove "\letterpercent" in the lpath. so why do you use the \letterpercent then It was

  1   2   >